package fi.helsinki.cs.scheduler3000;

/**
 * @author Team TA's
 */
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.HashMap;

public abstract class Report {

    // nämä näkyvät aliluokissa
    protected Schedule schedule;
    protected HashMap<String, Object> options;

    public Report(Schedule schedule, HashMap<String, Object> options) {
        this.schedule = schedule;
        this.options = options;
    }

    public void printToFile(String filename) throws FileNotFoundException {
        PrintWriter out = null;
        try {
            out = new PrintWriter(filename);
            out.print(this);
        } finally {
            out.close();
        }
    }

    /*
     * Tämä tulee syrjäyttää aliluokissa
     *
     */
    @Override
    public abstract String toString();
}
